import http from '@/utils/request'


const basePath = process.env.VUE_APP_BASE_TT_IM


//通过用户名查询好友列表
export function friendListByUserName(data) {
    return http({
        url: `${basePath}/im-consumer-friend/friendListByUserName?username=${data}`,
        method: "get"
    })
}


//添加好友
export function addFriend(data) {
    return http({
        url: `${basePath}/im-consumer-friend/addFriend`,
        method: "post",
        data: data
    })
}

//查询好友申请列表信息
export function listByNoPage() {
    return http({
        url: `${basePath}/im-addfriend-msg`,
        method: "get"
    })
}

//同意或拒绝好友申请
export function agreeFriendMsg(data) {
    return http({
        url: `${basePath}/im-consumer-friend/agreeAddFriendMsg`,
        method: "post",
        data: data
    })
}